package pa2.system;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.Map;

import pa2.node.Node;
import pa2.node.NodeData;
import pa2.util.EqualityCompare;




public interface Peer extends Remote {
	
    /**
     * Returns the service name.
     *
     * @return the service name.
     */
    public final String SERVICENAME = "dht.Peer";
    
	public <K extends EqualityCompare<K>, V, M extends Map<K,V>>
		Node<K,V,M> createNode(K key, NodeData<K,V,M> data) 
			throws RemoteException;
	
	public <K extends EqualityCompare<K>, V, M extends Map<K,V>>
		void destroyNode(Node<K,V,M> node)
			throws RemoteException;
    
    
    public String getName() throws RemoteException;


}